
#include <stdio.h>
#include <stdlib.h>
#include "double_link_list.h"

int main()
{
	/*1 创建空链表*/
	LIST *list = list_create();
	/*2 尾部插入节点*/
	list_append(list, 10);
	list_append(list, 30);	
	list_append(list, 60);
	list_insert(list,0,20);	
	list_insert(list,2,40);	
	list_insert(list,3,50);	
	/*3 遍历打印*/
	list_next_print(list);	
	printf("链表中第1个节点值 = %d\n", 
			*list_at(list, 1));
	/*4 删除节点*/
    list_erase(list, 0);
	list_erase(list, 4);
	list_next_print(list);	

	/*6 销毁链表*/
	list_destroy(list);
    return 0;
}




